package com.cq.hd.product.controller;

import com.cq.hd.common.response.Result;
import com.cq.hd.common.response.ResultGenerator;
import com.cq.hd.product.api.TbActiveEnrollInfoApi;
import com.cq.hd.product.api.vo.ActiveEnrollInfoVo;
import com.cq.hd.product.service.TbActiveEnrollInfoService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 活动报名信息表(报名活动) 前端控制器
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-23
 */
@RestController
public class TbActiveEnrollInfoController implements TbActiveEnrollInfoApi {

    @Autowired
    private TbActiveEnrollInfoService activeEnrollInfoService;

    @ApiOperation(value = "根据活动id查询报名信息数据")
    @ApiImplicitParam(name = "activeId", value = "活动id", paramType = "query", dataType = "Long")
    @ApiResponse(response = ActiveEnrollInfoVo.class, code = 200, message = "接口返回对象参数")
    @Override
    public Result<List<ActiveEnrollInfoVo>> listByActiveId(Long activeId) {
        return ResultGenerator.success(activeEnrollInfoService.listByActiveId(activeId));
    }
}
